<?php

namespace app\models;

use yii\db\ActiveRecord;

/**
 * 卡流量分段统计
 *
 *
 * @property Agent $agent 关联代理商
 */
class CardUsageSub extends ActiveRecord
{
    
    /**
     * 关联代理商
     */
    public function getAgent(){
        return $this->hasOne(Agent::class,['id'=>'agent_id']);
    }
    /**
     * 关联卡
     */
    public function getCard(){
        return $this->hasOne(Card::class,['id'=>'card_id']);
    }
    /**
     * 关联套餐
     */
    public function getPackage(){
        return $this->hasOne(Package::class,['id'=>'package_id']);
    }
}
